---
title: SAIF.Business.Tasks database tables
summary: Database tables used by this library with relationships and usage context.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks
reference_type: embedded
---

# SAIF.Business.Tasks database tables

This page catalogs database tables accessed by this library. All tables are accessed without an explicit schema qualifier in the scanned SQL; schema is recorded as `[unqualified]**`.

## Table catalog

| Table | Database | Schema/Link | CRUD | Purpose | Primary business object |
| --- | --- | --- | --- | --- | --- |
| [TASK](#task) | Oracle | `[unqualified]`** | C, R, U, D | Task/reminder record attached to a claim, policy, or other entity | `clsTask` |
| [TASK_ACTION_CODE](#task_action_code) | Oracle | `[unqualified]`** | R | Action-code reference values for tasks | `clsTaskActionCode` |
| [TASK_CATEGORY_CODE](#task_category_code) | Oracle | `[unqualified]`** | R | Category-code reference values, incl. defaults/notepad flag | `clsTaskCategoryCode` |
| [TASK_PRIORITY_CODE](#task_priority_code) | Oracle | `[unqualified]`** | R | Priority-code reference values | `clsTaskPriorityCode` |
| [TASK_SOURCE_CODE](#task_source_code) | Oracle | `[unqualified]`** | R | Source-system-code reference values | `clsTaskSourceCode` |

## TASK

| Field | Value |
| --- | --- |
| **Database** | Oracle |
| **Schema/Link** | `[unqualified]`** |
| **Purpose** | Stores task/reminder rows, one per task instance, linked to claim/policy/imaging entities via optional columns and to an arbitrary business entity via the six `CONTEXT_*` columns. |
| **Access pattern** | Both — CRUD routed through the `pk82036_task` stored-procedure package; ad-hoc read filtering via inline dynamic SQL |
| **CRUD operations** | Create, Read, Update, Delete |
| **Key columns used** | `TASK_SEQ_NUM`, `TASK_USER`, `TASK_SOURCE_CODE`, `TASK_CATEGORY_CODE`, `TASK_PRIORITY_CODE`, `TASK_ACTION_CODE`, `TASK_DATE`, `DELETE_FLAG`, `CLAIM_ID`, `POLICY_NUM`, `UPDATE_SEQ_NUM` |
| **Sequence** | None — `CreateSQL` returns `String.Empty`; `TASK_SEQ_NUM` is assigned inside `pk82036_task.task_insert`** |
| **Related tables** | `TASK_ACTION_CODE`, `TASK_CATEGORY_CODE`, `TASK_PRIORITY_CODE`, `TASK_SOURCE_CODE` |
| **Business objects** | `clsTask` (`CriteriaBase`), `clsTaskCollection` (`Criteria`) |

### Operations referencing this table
- [Retrieve a filtered task list](operations/retrieve-filtered-task-list.md)
- [Create/insert a task](operations/create-insert-task.md)
- [Update a task](operations/update-task.md)
- [Delete (complete) a task](operations/delete-complete-task.md)
- [Retrieve a single task](operations/retrieve-single-task.md)
- [Purge completed tasks](operations/purge-completed-tasks.md)
- [Save a task collection](operations/save-task-collection.md)

### Business rules referencing this table
- [BR-010: Task insert must affect exactly one row](business-rules.md#br-010-task-insert-must-affect-exactly-one-row)
- [BR-011: Task update must affect exactly one row](business-rules.md#br-011-task-update-must-affect-exactly-one-row)
- [BR-012: Task delete must affect exactly one row](business-rules.md#br-012-task-delete-must-affect-exactly-one-row)
- [BR-013: Optimistic concurrency via UPDATE_SEQ_NUM](business-rules.md#br-013-optimistic-concurrency-via-update-sequence-number)
- [BR-016: MailIDs are stored and compared trimmed and upper-cased](business-rules.md#br-016-mailids-are-stored-and-compared-trimmed-and-upper-cased)
- [BR-017: Completed tasks are excluded from searches unless ShowCompleted is set](business-rules.md#br-017-completed-tasks-are-excluded-from-searches-unless-showcompleted-is-set)
- [BR-018: A priority-level filter selects that priority and all higher ones](business-rules.md#br-018-a-priority-level-filter-selects-that-priority-and-all-higher-ones)
- [BR-019: Filter values accept single values or lists](business-rules.md#br-019-filter-values-accept-single-values-or-lists)
- [BR-020: Date-range filtering compares the truncated TASK_DATE](business-rules.md#br-020-date-range-filtering-compares-the-truncated-task-date)
- [BR-021: Result sets may be capped to N most-relevant rows](business-rules.md#br-021-result-sets-may-be-capped-to-n-most-relevant-rows)
- [BR-022: Retrieval of a task with no concrete task class is not permitted](business-rules.md#br-022-retrieval-of-a-task-with-no-concrete-task-class-is-not-permitted)

### SQL referencing this table
- [SQL-001: Insert a task](sql/SQL-001-insert-task.md)
- [SQL-002: Select a single task](sql/SQL-002-select-task.md)
- [SQL-008: Retrieve a filtered task list](sql/SQL-008-retrieve-filtered-task-list.md)
- [SQL-013: Update a task](sql/SQL-013-update-task.md)
- [SQL-014: Delete a task](sql/SQL-014-delete-task.md)
- [SQL-015: Purge completed tasks](sql/SQL-015-purge-tasks.md)

---

## TASK_ACTION_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle |
| **Schema/Link** | `[unqualified]`** |
| **Purpose** | Read-only reference values for task action codes (`CODE`, `CODE_DESCR`). |
| **Access pattern** | Direct SQL only |
| **CRUD operations** | Read |
| **Key columns used** | `CODE`, `CODE_DESCR` |
| **Sequence** | N/A |
| **Related tables** | `TASK` (via `TASK.TASK_ACTION_CODE`) |
| **Business objects** | `clsTaskActionCode`, `clsTaskActionCodeCollection` |

### Operations referencing this table
- [Load a code table](operations/load-code-table.md)

### Business rules referencing this table
- [BR-023: Code tables are read-only reference data](business-rules.md#br-023-code-tables-are-read-only-reference-data)

### SQL referencing this table
- [SQL-003: Select a single task action code](sql/SQL-003-select-task-action-code.md)
- [SQL-004: Select all task action codes](sql/SQL-004-select-task-action-code-list.md)

---

## TASK_CATEGORY_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle |
| **Schema/Link** | `[unqualified]`** |
| **Purpose** | Read-only reference values for task category codes, including default action/priority codes and the notepad-required flag, scoped by source system. |
| **Access pattern** | Direct SQL only |
| **CRUD operations** | Read |
| **Key columns used** | `CODE`, `CODE_DESCR`, `DEFAULT_ACTION_CODE`, `DEFAULT_PRIORITY_CODE`, `NOTEPAD_REQUIRED_FLAG`, `TASK_SOURCE_CODE` |
| **Sequence** | N/A |
| **Related tables** | `TASK_SOURCE_CODE`, `TASK_ACTION_CODE` (default), `TASK_PRIORITY_CODE` (default), `TASK` (via `TASK.TASK_CATEGORY_CODE`) |
| **Business objects** | `clsTaskCategoryCode`, `clsTaskCategoryCodeCollection`, `clsTaskBusinessRules` (rule TASK1) |

### Operations referencing this table
- [Load a code table](operations/load-code-table.md)
- [Create/insert a task](operations/create-insert-task.md) (source/category validation)

### Business rules referencing this table
- [BR-005: The Task Source Code / Task Category Code combination must exist](business-rules.md#br-005-the-task-source-code-task-category-code-combination-must-exist)
- [BR-023: Code tables are read-only reference data](business-rules.md#br-023-code-tables-are-read-only-reference-data)
- [BR-024: A category-code collection is valid only if at least one row was found](business-rules.md#br-024-a-category-code-collection-is-valid-only-if-at-least-one-row-was-found)

### SQL referencing this table
- [SQL-005: Valid source/category check](sql/SQL-005-valid-source-category-check.md)
- [SQL-006: Select a single task category code](sql/SQL-006-select-task-category-code.md)
- [SQL-007: Select all task category codes for a source system](sql/SQL-007-select-task-category-code-list.md)

---

## TASK_PRIORITY_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle |
| **Schema/Link** | `[unqualified]`** |
| **Purpose** | Read-only reference values for task priority codes (`CODE`, `CODE_DESCR`). |
| **Access pattern** | Direct SQL only |
| **CRUD operations** | Read |
| **Key columns used** | `CODE`, `CODE_DESCR` |
| **Sequence** | N/A |
| **Related tables** | `TASK` (via `TASK.TASK_PRIORITY_CODE`) |
| **Business objects** | `clsTaskPriorityCode`, `clsTaskPriorityCodeCollection` |

### Operations referencing this table
- [Load a code table](operations/load-code-table.md)

### Business rules referencing this table
- [BR-023: Code tables are read-only reference data](business-rules.md#br-023-code-tables-are-read-only-reference-data)
- [BR-025: Unrecognized codes map to a safe default](business-rules.md#br-025-unrecognized-codes-map-to-a-safe-default)

### SQL referencing this table
- [SQL-009: Select a single task priority code](sql/SQL-009-select-task-priority-code.md)
- [SQL-010: Select all task priority codes](sql/SQL-010-select-task-priority-code-list.md)

---

## TASK_SOURCE_CODE

| Field | Value |
| --- | --- |
| **Database** | Oracle |
| **Schema/Link** | `[unqualified]`** |
| **Purpose** | Read-only reference values for task source-system codes (`CODE`, `CODE_DESCR`). |
| **Access pattern** | Direct SQL only |
| **CRUD operations** | Read |
| **Key columns used** | `CODE`, `CODE_DESCR` |
| **Sequence** | N/A |
| **Related tables** | `TASK_CATEGORY_CODE`, `TASK` (via `TASK.TASK_SOURCE_CODE`) |
| **Business objects** | `clsTaskSourceCode`, `clsTaskSourceCodeCollection` |

### Operations referencing this table
- [Load a code table](operations/load-code-table.md)

### Business rules referencing this table
- [BR-023: Code tables are read-only reference data](business-rules.md#br-023-code-tables-are-read-only-reference-data)
- [BR-025: Unrecognized codes map to a safe default](business-rules.md#br-025-unrecognized-codes-map-to-a-safe-default)

### SQL referencing this table
- [SQL-011: Select a single task source code](sql/SQL-011-select-task-source-code.md)
- [SQL-012: Select all task source codes](sql/SQL-012-select-task-source-code-list.md)

---

## Table relationship diagram

The following diagram shows relationships between tables used by this library. No `JOIN` clause exists anywhere in this library's SQL; all relationships below are inferred from column naming and predicate usage.

```mermaid
erDiagram
    TASK_SOURCE_CODE ||--o{ TASK_CATEGORY_CODE : "TASK_SOURCE_CODE = CODE (inferred)"
    TASK_SOURCE_CODE ||--o{ TASK : "TASK_SOURCE_CODE = CODE (inferred)"
    TASK_CATEGORY_CODE ||--o{ TASK : "TASK_CATEGORY_CODE = CODE (inferred)"
    TASK_ACTION_CODE ||--o{ TASK : "TASK_ACTION_CODE = CODE (inferred)"
    TASK_PRIORITY_CODE ||--o{ TASK : "TASK_PRIORITY_CODE = CODE (inferred)"
    TASK_CATEGORY_CODE ||--o| TASK_ACTION_CODE : "DEFAULT_ACTION_CODE = CODE (inferred)"
    TASK_CATEGORY_CODE ||--o| TASK_PRIORITY_CODE : "DEFAULT_PRIORITY_CODE = CODE (inferred)"
```

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [SQL catalog](sql/index.md)
- [Procedures](procedures/index.md)
- [API reference](api/index.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Business.Tasks/clsTask.vb
- SAIF.Business.Tasks/clsTaskCollection.vb
- SAIF.Business.Tasks/clsTaskActionCode.vb
- SAIF.Business.Tasks/clsTaskActionCodeCollection.vb
- SAIF.Business.Tasks/clsTaskCategoryCode.vb
- SAIF.Business.Tasks/clsTaskCategoryCodeCollection.vb
- SAIF.Business.Tasks/clsTaskPriorityCode.vb
- SAIF.Business.Tasks/clsTaskPriorityCodeCollection.vb
- SAIF.Business.Tasks/clsTaskSourceCode.vb
- SAIF.Business.Tasks/clsTaskSourceCodeCollection.vb
- SAIF.Business.Tasks/clsTaskBusinessRules.vb
- SAIF.Business.Tasks/app.config
- SAIF.Business.Tasks/Web.config
